home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Super Shareware Collection
/
Super Shareware Collection.iso
/
os_2
/
epmgcc10.zip
/
GCC.DOC
< prev
next >
Wrap
Text File
|
1994-02-05
|
8KB
|
214 lines
EMX/GCC Interface to EPM 5.51
EPMGCC Version 1.00
Bernhard Bablok
January, 1994
Credit:
~~~~~~
Credit has to be given to Jon Hacker who wrote EPMTEX, the TeX interface to EPM.
Some of the ideas and parts of the documentation are taken from his excellent
work. With his code as a basis, the development of this application was straight
forward. Any errors and oversights are nevertheless my fault.
Disclaimer:
~~~~~~~~~~
See the attached license.txt file. It is a modification of Jon's file included
with EPMTEX, which in turn is copied more or less from IBM's license agreement.
Introduction:
~~~~~~~~~~~~
Although I hate fighting my way through menues and submenues and subsubmenues I
did miss some of the features of Microsoft's Programmer's Workbench when working
with the GNU c-compiler. So I tried to facilitate programm development with the
help of some REXX and E-macros.
After getting access to the EPMTEX-package of Jon Hacker which adds menu-support
for TeX to EPM, I decided to build a full featured GCC-interface in a similar
way.
With EPMGCC you can compile (and link) files, build projects, maintain makefiles
and so on without leaving the editor. Since compile- and make-results are piped
to an error-file, it is possible to move from error to error simply by pressing
a predefined key combination. The cursor is positioned on the correct line (i.e.
the line with the error). All source-files are loaded into the edit-ring
automatically if necessary.
As a supplement, I have included a VREXX script called epro.cmd. This is a
simple makefile maintenance utility which can also be used stand-alone. VREXX is
IBM-employee-written software adding "PM"-support to REXX and is available free
of charge from various ftp-sites.
Installation:
~~~~~~~~~~~~
See the file install.doc for a description how to install EPMGCC and how to
configure and recompile the macros for epm. Don't panic, it is less complicated
than it seems!
Configuration:
~~~~~~~~~~~~~
EPMGCC offers two levels of configuration. You can define the utilities
(compiler, make, debugger) which are invoked by the various menu-selections.
These definitions cannot be changed after the compilation of the edit-macros.
In addition you can define startup values for the compile/build-options and for
the debug, autosave and verbose toggles. These values can be changed at runtime
but they cannot be saved from session to session.
Details about configuration can be found in the file install.doc and in the file
gccenv.smp.
Description of menu-items:
~~~~~~~~~~~~~~~~~~~~~~~~~
> Open Project
Pops up an entrybox asking for the name of a makefile. The makefile need not
exist. All results of make will be piped to a file with the same base name
and extension ".err".
> Edit Project
If you decide to use EPRO, this selection starts the VREXX-script epro.cmd,
the makefile maintenance-utility. Depending on your configuration of EPMGCC,
this might only load the makefile into the edit-ring.
> Close Project
Close the current project (before you can change the project, you have to
close the currently open project).
> Set Compile Options (c-F11)
This menu-choice defines the compile options used with "Compile Current File"
depending on the setting of "Debug Mode" (see below). The options are passed
directly to gcc with the following execptions:
%* is replaced with the fully qualified filename of the current file
%**D is replaced with the drive letter and colon
%**P is replaced with the path including drive and trailing '\'
%**F is replaced with filename and extension (without path)
%**N is replaced with the filename only
%**E is replaced with the extension
Examples:
-c -g2 %* Compile current file, add debug information.
-O2 -o %**P%**N.exe %* Compile current file and link. The exe-file has the
same base name as the current file.
-O2 -o c:\bin\%**N.exe %* Identical to the second example, but places the exe-
file into the c:\bin directory.
Note: All '\' are replaced by '/' automatically (this might be a problem if
you use native OS/2 applications instead of gcc or GNU-make).
> Compile Current File (c-F12)
Depending on the setting of "Debug Mode" either compiles the current file with
the debug or production options in effect. The options can be changed with
"Set Compile Options".
> Set Build Options (s-F11)
Define options passed to the make utility. The same replacement syntax is used
as in "Set Compile Options", exept that the project-file (makefile) is used
instead of the current file. Note that the parts of the makefile-name are only
available if they are entered. Again two sets of options are kept, one for
debug mode and one for production.
> Build Current Project (s-F12)
Make is invoked with the appropriate set of options.
> View Results
This selection switches to the last error-file produced either by "Compile
Current File" or by "Build Current Project". The file is always loaded from
disk - it is possible to have more than one copy of the same file in the
edit-ring. See also the discussion of the ALT-Q key combination.
> Run Exe
If the exe-file exists this menu-item pops up an entrybox asking for the
runtime parameters and starts the program in a new session. If the program
just prints out some text and then terminates, this option will not be very
useful (unless you have a very slow machine).
Note that it is necessary that your makefile generates an exe-file with the
same base name as the project file, otherwise this (and the following) option
won't work.
> Debug Exe
Invokes gdb (or any other debugger you have configured).
> Debug Mode
Toggles debug mode. If this menu item is checked, debug mode is in effect,
otherwise production mode.
> Auto Save
Toggles autosave mode. If this menu item is checked, the current file is saved
prior to invoking gcc if "Compile Current File" is selected. If "Build Current
Project" is selected, all files in the edit-ring are saved first.
> Verbose Mode
Toggles verbose mode. If this menu item is checked, all generated commands are
displayed in the message area prior to invoking them.
Accelerator keys:
~~~~~~~~~~~~~~~~
> CONTROL-F11 = "Set Compile Options"
> CONTROL-F12 = "Compile Current File"
> SHIFT-F11 = "Set Build Options"
> SHIFT-F12 = "Build Current Project"
> ALT-Q ("goto next error")
This special key-combination (defined in gcckeys.e) is used to jump from one
syntax error to the next. The first time ALT-Q is pressed since the last
compile or build the key combination is identical to "View Results". Otherwise
ALT-Q will behave as follows:
If ALT-Q is pressed while in the error-file, the cursor will jump to the error
(-line) of the compiler-error-message the cursor is positioned on and display
the message in the message area. If ALT-Q is pressed in a source-file, the
cursor jumps directly to the next error. The message parser is programmed to
skip all information-messages or link-errors.
Note1: If you add or delete lines in a source file after invoking compile/build
the cursor will of course be positioned on lines below or above the
actual error - so don't be suprised.
Note2: If you use EPMGCC with a different compiler than gcc, you will most
likely have to change the parser of the error messages in the procedure
"gcc_next_error" in the file gccproc.e.
1/28/94
Bernhard Bablok
D-82256 Fuerstenfeldbruck, Germany
INTERNET: ua302cb@sunmail.lrz-muenchen.de